FROM --platform=$TARGETPLATFORM registry.cn-zhangjiakou.aliyuncs.com/publicx/debian:11.7

COPY --from=registry.cn-zhangjiakou.aliyuncs.com/publicx/oracle-jdk-archive:8u381 /jdk-8u381-linux.tar.gz /

RUN tar -xzf /jdk-8u381-linux.tar.gz

FROM --platform=$TARGETPLATFORM registry.cn-zhangjiakou.aliyuncs.com/publicx/debian:11.7

MAINTAINER xuelingkang

COPY --from=0 /jdk1.8.0_381 /opt/jdk1.8.0_381

RUN ln -sf /opt/jdk1.8.0_381 /opt/jdk

ENV JAVA_VERSION=8u381
ENV JAVA_HOME=/opt/jdk
ENV JRE_HOME=$JAVA_HOME/jre
ENV CLASSPATH=.:$JAVA_HOME/lib:$JRE_HOME/lib
ENV PATH=$JAVA_HOME/bin:$PATH
ENV LANG C.UTF-8
ENV LANGUAGE C.UTF-8

